﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Caliburn.Micro;
using JY.IOC;
using JY.Wpf.Core.Enums;
using JY.Wpf.Core.Events;
using JY.Wpf.Core.ViewModelBases;
using JY.Wpf.TestClient.Views;

namespace JY.Wpf.TestClient.ViewModels
{
    public class TestChildWindowViewModel : ChildWindowViewModelBase
    {
        public TestChildWindowViewModel()
        {
            
        }

        public override void ChildWindowClosing(CancelEventArgs args)
        {
            MessageBoxResult messageBoxResult = MessageBox.Show($"当前正在配置轨迹！可能存在未保存数据！是否关闭窗体？", "提示信息", MessageBoxButton.YesNo);
            if (messageBoxResult != MessageBoxResult.Yes)
            {
                args.Cancel = true;
            }
        }
    }
}
